package cn.sciento.farm.devicemanager.dao.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import groovy.transform.Field;
import lombok.Data;
import lombok.Value;

import java.io.Serializable;

/**
 * 虫情灯
 * @author Walton
 * @since 2020/8/18 17:35
 */
@Data
public class DevInsectSituationLamp extends Model<DevInsectSituationLamp> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 虫情灯ID
     */
    private Integer modbusAddr;

    private String name;

    private String eui;

    private Integer status;

    private Integer online;

    private String location;

    private String remark;

    private String tenantId;

    private Integer areaId;

    private Integer landId;

    /**
     * 加热实际时长
     */
    @JSONField(name = "hTimeAct")
    private Integer heatTimeActual;

    /**
     * 加热实际温度
     */
    @JSONField(name = "hTempAct")
    private Double heatTemperatureActual;

    /**
     * 电池电压
     */
    @JSONField(name = "vbat")
    private Double voltageBattery;

    /**
     * 温控
     */
    @JSONField(name = "tempC")
    private Integer temperatureControl;

    /**
     * 雨控
     */
    @JSONField(name = "rainC")
    private Integer rainControl;

    /**
     * 光控
     */
    @JSONField(name = "lighthC")
    private Integer lighthouseControl;

    /**
     * 上仓门开关
     */
    @JSONField(name = "upDoorSw")
    private Integer upDoorSwitch;

    /**
     * 下仓门开关
     */
    @JSONField(name = "lowDoorSw")
    private Integer lowDoorSwitch;

    /**
     * 加热开关
     */
    @JSONField(name = "heatSw")
    private Integer heatSwitch;

    /**
     * 灯管开关
     */
    @JSONField(name = "lightSw")
    private Integer lightSwitch;

    /**
     * 清扫开关
     */
    @JSONField(name = "sweepSw")
    private Integer sweepSwitch;

    /**
     * 平铺开关
     */
    @JSONField(name = "tileSw")
    private Integer tileSwitch;

    /**
     * 摄像头开关
     */
    @JSONField(name = "phtotsSw")
    private Integer phtotsSwitch;

    /**
     * 光控开关
     */
    @JSONField(name = "lighthSw")
    private Integer lighthouseSwitch;

    /**
     * 光照控制时间
     */
    @JSONField(name = "linghtCT")
    private Integer linghtControlTime;

    /**
     * 时控开关
     */
    @JSONField(name = "timeSw")
    private Integer timeSwitch;

    /**
     * 控制开始时间
     */
    @JSONField(name = "startCT")
    private String startControlTime;

    /**
     * 控制结束时间
     */
    @JSONField(name = "endCT")
    private String endControlTime;

    /**
     * 收集时间
     */
    @JSONField(name = "collectT")
    private Integer collectTime;

    /**
     * 加热设定时长
     */
    @JSONField(name = "hTimeSet")
    private Integer heatTimeSet;

    /**
     * 加热设定温度
     */
    @JSONField(name = "hTempSet")
    private Double heatTemperatureSet;

    /**
     * 数据上传周期
     */
    private Integer dataPeriod;

    /**
     * 图片上传周期
     */
    private Integer phtotsPeriod;

    /**
     * 延迟时间
     */
    private Integer delay;

    /**
     * 验证码
     */
    private String validateCode;

    /**
     * 图片分辨率
     */
    private Integer ratio;

    /**
     * 摄像头序列号
     */
    private String phtotsSerial;

    private Long createTime;

    private Long updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "DevInsectSituationLamp{" +
                "id=" + id +
                ", modbusAddr='" + modbusAddr + '\'' +
                ", eui='" + eui + '\'' +
                ", status=" + status +
                ", online=" + online +
                ", location='" + location + '\'' +
                ", remark='" + remark + '\'' +
                ", tenantId='" + tenantId + '\'' +
                ", areaId=" + areaId +
                ", landId=" + landId +
                ", heatTimeActual=" + heatTimeActual +
                ", heatTemperatureActual=" + heatTemperatureActual +
                ", voltageBattery=" + voltageBattery +
                ", temperatureControl=" + temperatureControl +
                ", rainControl=" + rainControl +
                ", lighthouseControl=" + lighthouseControl +
                ", upDoorSwitch=" + upDoorSwitch +
                ", lowDoorSwitch=" + lowDoorSwitch +
                ", heatSwitch=" + heatSwitch +
                ", lightSwitch=" + lightSwitch +
                ", sweepSwitch=" + sweepSwitch +
                ", tileSwitch=" + tileSwitch +
                ", phtotsSwitch=" + phtotsSwitch +
                ", lighthouseSwitch=" + lighthouseSwitch +
                ", linghtControlTime=" + linghtControlTime +
                ", timeSwitch=" + timeSwitch +
                ", startControlTime='" + startControlTime + '\'' +
                ", endControlTime='" + endControlTime + '\'' +
                ", collectTime=" + collectTime +
                ", heatTimeSet=" + heatTimeSet +
                ", heatTemperatureSet=" + heatTemperatureSet +
                ", dataPeriod=" + dataPeriod +
                ", phtotsPeriod=" + phtotsPeriod +
                ", ratio=" + ratio +
                ", phtotsSerial=" + phtotsSerial +
                ", delay=" + delay +
                ", validateCode=" + validateCode +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
